import request from '@/utils/request'

// 查询商品保障列表
export function listProtection(query) {
  return request({
    url: '/system/protection/list',
    method: 'get',
    params: query
  })
}

// 查询商品保障详细
export function getProtection(id) {
  return request({
    url: '/system/protection/' + id,
    method: 'get'
  })
}

// 新增商品保障
export function addProtection(data) {
  return request({
    url: '/system/protection',
    method: 'post',
    data: data
  })
}

// 修改商品保障
export function updateProtection(data) {
  return request({
    url: '/system/protection',
    method: 'put',
    data: data
  })
}

// 删除商品保障
export function delProtection(id) {
  return request({
    url: '/system/protection/' + id,
    method: 'delete'
  })
}
